Part Number Hot Search : 
OX9162 5ETTT UPG2214 B3943 042N03 B962033 CEM4201 NX6240GP
Product Description
Full Text Search
 

To Download OV528 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  OV528 single chip camera to serial bridge shanghai omnivision ic design, inc. july 18, 2002 preliminary user manual rev. 1.1 shanghai omnivision ic design, inc. re serves the right to make changes w i t hout further notice to any product herein to improve reliability , function or desi gn. o m nivision does not assume any liabilit y arising out of the application or use of any project, circuit described herein; neither does it convey any license under its patent nor the right of others. this document contains information of a proprietar y n a ture. n one of this information shall be divulged to persons othe r than shanghai omnivision ic design, inc. employ ee author ized by the nature of their duties to receive such information, or individuals or organizations authorized by shangh ai omnivision ic design, inc. free datasheet http://www.datasheetlist.com/
OV528 user manual t a ble of contents 1. introduction .... ................ ............... ............... ............... ........... ............. ........... ........... .. ... ... ... .. .... ... ... ...1 1.1 OV528.. ??.............................................................................................................. .....????2 1. 2 sensors ???.. ........ ...... ..... ...... ....... ...... ..... ...... ...??.. ...... ...... ..... ...... ...... ..... ....... ...... ... ... ... ? 2 1. 3 boards ?.??...... .. ......... ...... ....... .. ......... ...... ....... .. ......... ...... ....... .. ......... ...... ....... .. .... ..... ...... .?2 1.3.1 evaluat ion board............ .? ????......... ....... .... ..... ..... .. ....... .... ..... ..... .. ....... .... .??? 2 1.3.2 demo boar d............. . ........ ....???. ........ ..... ...... .... ........ ..... ...... .... ........ ..... ...... .... .......?2 2. do w n load / update firm w a r e ........ .................. ............... ............... .............. ................ .......???.. .. .5 3. sof t w a re user guide........ ... ... .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ...?? ... ... . .... ... ... ... ... ... ... .. .... ..?. ...7 3.1 sy stem inst allation........ .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ...?? ... ... ... . . ?. ...??7 3.2 initialization. ...... ... ... .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ...?? ...?7 3.3 functions overvie w ...... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. ... ...???? 8 3.4 v i e w group. .........???????? ................. ................ ............... ............... ............... ............ .9 3.5 snap shot group?................ .............. ................ ...............? ............. ................ .............. . ..?. . 10 3.6 dsc group ........?........... .............. ................ ............... ............... ............... ......? ....... . ... ... ... ... .11 3.7 cursor & mouse messages........... ..................... ... ..................... ... ..................... ... ............. ..?12 4. soft w a re develop guide.... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ..?. . 13 4. 1 dat a struct ure ?????.... ........ ..... ............ ........ .... ............ ........ .... ............ ........ .... ............ ..13 4.1.1 sensor t y pe???........ .... .... .... .... ... ..... .... .... .... .... ... ..... .... .... .... .... ... ..... .... .... .... .... ... ..?...1 3 4.1.2 color ty pe????? .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. ??.13 4.1.3 jpeg image siz e ? ? ............. ................. .............. ................ ............... ............... ........?..13 4.1.4 bitmap image size (previe w size) ...... ... ... ... .... ... ... ... ... ... ... .. .... ... ... ... ... ... ... .. .... ... ... ... ... .? .14 4.1.5 previe w or snap shot image information (select _ p a ram) ... ................ .?......... .........14 4.1.6 flash memroy file i n formation(pflash_fil et ableitem) ... ... ... ... ... . .... ... ... ... ... ... .? ?.... ... .14 4.1.7 displ a y image information ( o nl y in ov5 28a p.e x e ) ...... ... ... . .... ... ... ... ... ... ... .. .... ... ... ..?. ... .15 4.2 function modules ?? ??....... ................. ............... ............... ........... ............. ........... .......??15 4.2.1 co mmands..???.... ............. ............ .............. ............ ............. ............. ............. ......?15 4.2.2 do w n load or update firm w a re?..... ..... .... .... .... .... ... ..... .... .... .... .... ... ..... .... .... .... ...? ??.20 4.2.3 sy stem? s initia lization, s t art, s t op and reset (exit)?.... ... ... ... ... ... ... .. .... ... ... .??? ?.?22 4. 2. 4 preview of live v i deo? ???????????..... ..... ..... ....... ..... ...... ..... ..?????26 4.2.5 snapshot of s t ill jpeg image???????? .....?............. ................. .....?? ? .?? 27 4.2.6 dsc or flash memor y function s??. .... ... ... ... ... ... ... .. .... .??.. ... .? ???????.??29 4. 2. 7 jpeg image dec oding?????????. . .................... ... ...............??????.?34 4. 2. 8 ot her f unct i ons?. ..... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ... ???... ... .?. 36 4.2.9 t h reads and s y nc hr oniz a tion.............. ............... ........???....... ............. .....??.......?.39 index of functi ons?????........................?? ...................................................................??......... .40 references?????.......... ............ ..........??.?? ........... .......... ........... .......... ..............? ?..........40 shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 1 free datasheet http://www.datasheetlist.com/
OV528 user manual 1. intr oduction this d o c u m e n t aim s at provi din g a gui de li ne t o th e user or dev e l o p e r o f o v 528 sy stem in case th e sy stem will be m a intained and developed. 1.1 ov 528 o v 528 is t h e bac k -en d ch ip for the seria l bus cam e ra sy stem that ca n be at tac h e d to a w i reless or pda host an d perform s as a vid e o c a m e ra or a jp eg com p ressed still ca m e ra. it provi des c a m e ra (sensor) interf ace, seria l i n t e rface a n d jpeg i m age c o m p ression e n gine t o act as a l o w c o st a nd low p o wered sing le chi p so lut i o n for the high-resoluti on seria l bus p d a or cellular phone cam era accessory applications (see fig. 1-1). for detailed inform ation of o v 528, please refer [1]. 1.2 sensors so far , o v 528 supports four kinds of im ag e sensors: o v 7620, o v 7635, o v 6630 and o v 6640. o v 7620 a n d o v 7635 are cmo s di gi tal vi de o cam era se nsors w i t h v g a (640 x 4 8 0 ) or q v g a (3 2 0 x 2 4 0 ) reso lutio n . th e f r eq u e n c y o f th e ou tp ut frame is u p to 30 hz (vga). dif f eren t data form ats, y c r c b 4:2 : 2 , g r b 4: 2: 2 a n d rg b raw da t a , are s u p port e d. 16 bit or 8bi t v i de o da ta, nam e ly zv port, ccir601 or ccir656 are outputted. o v 6630 a n d o v 6640 im age s e ns ors pr ovi de cif (3 52 x2 88) or q c if (176 x1 4 4 ) d a ta o u t p u t form at. maxim u m fps (fram e per second) can achieve to 60. so m e advanc ed and at tract i v e functi ons a r e als o in te gra t ed i n t o th e s e nsors, s u c h as t h e ex pos ure con t rol , gam m a c o rrect io n, g a in c o n t rol, a u tom a tic w h i t e bal a nc e, bl oo m i ng? s drasti c a lly re du cti o n , etc. a l l t h ese funct i o n s or a l gori t hm s tog e th er guarante e the out p ut i m ages? qua lit y to reac h t h e satisfactory level. for m o re inform ation and specifications about the im age sensors, please refer m a terials [2] ? [5]. note: the su p p li ed pow ers f o r th ese fo ur t y pes of se nsor s are n o t the sam e . o v 7620 nee d s 5v d c to su pp ort w h ile t h e o t h e r three ty pes nee d 3. 0-3. 6 v d c. t h eref ore, before a se nso r is conn ect ed w ith a board, please m a ke sure the pow er provided by board is correct. 1.3 board 1.3 . 1 evaluation board ju m p ers on e v al uat i o n bo a r d m u st be c o rrectly set b e fore any fi el d usag e. t a bl e 1- 1 gi ves a reference of t h e jum p er and but to n p o si ti o n s. fig . 1-2 sh ow s the ske t c h m a p of jum p ers an d bu tto ns on o v 528 evaluation board. 1.3.2 d e mo board user sh ou ld remo v e r2 0 o f f an d ad d r1 3 (1 0 k ) o n de m o bo ard to do wn l o ad fi r m wa re. if su cceed, reposit them to run the sy stem . shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 2 free datasheet http://www.datasheetlist.com/
OV528 user manual camera interface jpeg codec sram sccb serial interface micr o contr o ller pr ogram buffer interface data path control path legend: fig. 1-1 o v 528 function block d i agram sensor ov 7620 ov 7635 ov 6630 ov 6640 shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 3 free datasheet http://www.datasheetlist.com/
OV528 user manual fig. 1-2 sketch map of jum p ers and buttons on o v 528 evaluation board t a ble 1-1. jum p er and button positions of o v 528 evaluation board d e scription of functions relevant jum p ers or buttons rem a rks a ll functions j 101->?0? j 102->?1? j 103->?1? j 104->?0? j 105->?1? j 106->?0? j 107->?1? j 1 1 1 ->?0? j 1 13->?1? these 9 jum p ers m u st be set on the given positions regardless the other conditions that the sy stem w o rks under . boot up the system / do wn lo ad firm ware j 108->?0? / j108->?1? firm ware is stored in eeprom. rs232 serial bus / 4 w i res serial bus j 109->?0? / j109->?1? if use rs232, to short-circuit j1c pin 3 and pin 4 internal microprocessor / external microprocessor j 1 14->?0? / j1 14->?1? reset button s12 reset the whole sy stem after pow er on snap shot button s1 1 get a still im age and save it into f l a s h me mo r y ex tern al po wer jet j4 1 5 vdc shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 4 free datasheet http://www.datasheetlist.com/
OV528 user manual 2. download/update firmwar e if it? s t h e first tim e to us e t h e OV528 sy stem , firm ware sh oul d b e do wnloa d e d in to t h e eeprom at fi rst . wh il e, i f an ol d vers i on firm w a re has alre ady bee n i n t h e eepr o m an d a n e w e r one e x ists , user ca n up da te t h e ol d on e by th e new fi rm w a re (in t h e la tter s i t u at i on, d o w n l o ad i ng can als o b e ef fective but w e don? t recom m e nd user to do so). a n application program nam e d o v 528d l.exe is used to undertake such w o rk. d oub le cl ic k the ico n of o v 528d l.e x e to ru n th e p r ogram , the m a in int e rfac e will l o o k li ke fig.2-1: select binar y fi le to do wnlo a d of operation select binar y fi le to update specify the a vail a ble com po rt baud ra te select operation mode select pr ogr ess fig. 2-1 main interface of download ing or updating firm ware program operation mode : 1 . do wnlo a d firmwa r e : dow nload firm w a re into o v 528, if it? s valid, save it into eeprom. 2. update firmwar e : update the old firm w a re in eepro m w ith a new one. 3 . do wnloa d ->upda te firmwar e : d o w n l o ad a fir m w a re into o v 528, t h e n use i t to s a v e a dif f erent firmware file into eepro m. in fact, e x c e pt th e sourc e file ( b ei ng dow n l o a de d) is dif f erent from the object file (being updated), m ode 3 is the sam e w ith m ode 1. if it is d o w n l o adi n g firm w a re, user sh ou ld set j u m p er j10 8 a t posi t i o n ?1?, ot herw i s e, se t i t a t ? 0 ? (refer t a ble 1-1 and fig. 1-1). besid e s this , user a l so ne e d s t o do som e a d d iti on al t h in gs before dow n l oa di ng or u p d a ti ng t h e firm ware 1. select the binary firm w a re file w ith the nam e *.bin if the operation m ode is ? do wnlo a d ->upda te firmwa r e ?, user needs to select tw o *.bin files, one is to be dow nloaded into o v 528, the other is to be saved into eepro m. 2. selec t a n ava i lab l e co m ( c o m 1 or c o m2) p o rt t h roug h w h ich host ca n co mmunicate with the f i rm ware shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 5 free datasheet http://www.datasheetlist.com/
OV528 user manual 3. s elect the supported baud rate, default one is 14400 for both dow nloading and updating. only after al l t h e thre e re quirem ents m e nti o ned ab ov e a r e m e t , ca n t h e op e r at i on b e c a rri ed o u t (see fig. 2-2), otherwise, error m e ssage will appear (see fig. 2-3). a. do wn lo ad firm ware in to ov5 2 8 b . up d a te firm ware in eeprom fig. 2-2 begin d o w n load or u pdate o p eration fig. 2-3 error occurs before updating firm ware if an error m e ssage b o x l i ke fig. 2-3 is sh ow n, user sh o u ld fo ll ow t h e i n struc t i ons t o fi nd o u t t h e problem . if not, fig. 2-4 tells user that the operation has been finished and the sy stem is all set. fig. 2-4 d o w n load or u pdate success message note: after successfully downloading the firm wa re, j108 should be placed at position ?0? (refer t a ble 1-1 ) . then push s1 1 (reset button) to res e t the sy stem before running the application program . shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 6 free datasheet http://www.datasheetlist.com/
OV528 user manual 3. softwar e user guide software will aut o m a tically recog n i ze wh i c h o n e is i n us e when th e sy ste m works up. c onsi d eri n g the flas h m e m o ry is o n ly a n opt io nal fu nc t i on of t h e sy st em , w e w i l l al so c h e c k t h e s y stem before showing the main interface to m a ke sure whether it is supported or not. 3.1 system installation the software of the system contains three files: 1. o v 528a p.exe : application program 2. o v 528d rv .dll : dy nam i c link library , driver for o v 528a p.exe 3. jpeg d ecoder . dll : dy nam i c link library , decode jpeg im age into bitm ap file. copy t h ese three files t o t h e sa m e folder t h en do ub le c l i c k o v 5 2 8 a p . e xe to ru n t h e program . the tw o d lls ca n also be p l ac ed u nder t h e w i nd ow ? s def a ul t dire ctor ie s. if o v 5 2 8 a p .e xe ca n? t fi nd any of the two dlls, an error m e ssage sim ilar with fig. 3-1 will app ear (under w i ndows 2000). fig. 3-1 a pplication program can? t find the d l l 3.2 initializ ation the first of al l thi ngs that t h e so ft wa re wi ll d o i s to in i tia l i z e th e serial interface (com or spi) o f the h o st (pc, pd a , cell-ph one , e t c.) i n o r der to set up the com m unicati on w a y b e t w een h o st an d o v 528. when s earch i ng the av ail a b l e c o mm unica tio n p o rt an d t h e su pp orte d bau d rat e , a li t tle tim e will b e cost. therefore, the driv er will create a processing bar to show the status. unfortun at ely , som e ti m e s the fun c t i o n m a y fail t o in iti a lize t h e sy ste m . in this cas e, a d i al og b o x (see fig.3-2) will show the error m e ssage. if this happens, please push s12 ( reset button ) then run o v 528a p.exe once again. if the problem still exists, please m a ke sure: a. external power has been correctly connected with the board (5v dc) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 7 free datasheet http://www.datasheetlist.com/
OV528 user manual b. the m ount ed sensor is com p at ibl e w i th t h e bo ard (for o v 762 0, t h e sens or ? s inp u t p o w e r is 5v d c , for ot hers, th e i n p u t pow er is 3. 3 v d c . just be cause of this reason, t h ere is a m i nor dif f erence between the boards as fo r the dif f erent sensor ty pe.) c. rs-232 cable has been correctly established betw een the board and host d. a t last one of co m1 and co m2 ports is unoccupied and available. therefore, som e tim e user needs to check and reset the system for several m o re tim es. fig.3-2 initialize fail message 3.3 functions overview : if th e hard war e sup p o r ts the flash m e m o ry and the sen s or typ e is ov7 6 # 0 (vga), th e app ear an ce of the user interface will look like fig.3-3. im ages will b e showi ng in t h e pr eview w i ndo w fra me by fra m e once the sy stem has been boot ed up. it wi ll di f f er in t h e fr a m e rate w h e n user c h oos e s dif f erent i m age form ats or s i zes. t h e pr ogr essing bar indicates the progress of im age? s loading operation. flash memory pictur e vi e w w i ndow pr ogr essing bar dsc gr o u p thumbnail w i ndow snapshot gr oup snapshot pictur e vi e w w i ndow pr eview w i ndow vi e w g r o u p fig.3-3 main interface of vga sens or (with flash mem o ry support) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 8 free datasheet http://www.datasheetlist.com/
OV528 user manual a still im age will be d i sp la y e d i n th e snapshot pictur e v i ew w i ndow if user s n a p shots an im a g e. mea n whil e, a copy of th is i m age will a p pear i n the thumbnail w i ndow in a sm alle r size . t o ta lly , there ca n be 11 suc h sm all im ages bei n g d i splay e d w i t h i n t h e bo un d o f the t hum bnail w i n dow a t m o st. whi c h m eans t h at w h en m o re im a g es are got, l a tter ones will overwrit e the form er i m ages. for conveni e nce, we gi ve them the na m e thumbn ail . user c a n revi ew a n y one of these 1 1 thum bnails b y clic ki ng it with th e c u rsor . then , t h e im age i n t e rest y o u wil l ap pe ar i n t h e snapshot pictur e v i ew w i ndow again. if yo u wan t t o sav e t h e i m a g e in an y s m al l th u m b n a i l in t o a fil e , you can d oub l e cli c k wit h you r mo u s e? s l e ft bu t t o n on it , t h en , a jpeg fi le wi ll be g e nerat e d, th e fi l e ? s n a m e i s sh own t o yo u in a m e ssage box. the i m age i n the dsc g r oup i s t h e on e th at you l o ad fro m t h e fl ash me m o ry . in flash memory pictur e v i ew w i ndow , y o u will v i ew t h e las t pi ct ure y ou lo ad fro m the flash m e m o ry in a m i nified s i ze. by cli c king i t with t h e c u r s or , it ca n a l s o be displ a ye d i n t h e snap shot pictur e v i ew w i ndow wh ere y ou can see m o re details of it . if the se nsor t y pe is ov66#0 (cif) a n d t h e flas h m e m o ry is supporte d, t h e ma in int e rface wi ll be another one (s ee. fi g.3- 4). e x ce pt the pre v iewing a n d sti ll im ages? size s, al l t h e ot her func ti ons are the sam e with that of vga sy stem . fig.3-4 main interface of cif se nsor (flash mem o ry support) 3.4 v i ew gr oup fro m the m a in d i a l o g , it ca n b e easi l y fo un d t h a t t h ere are f our fu nc tio n m odules in th is gr ou p. when the but t on be gin is pressed dow n , li ve im ages will ap pear withi n t h e pr evi e w wind ow fram e by frame. lim ited by the w i nd ow ? s area, som e im age? s show i n g size (m axim u m is 320* 24 0) m a y be dif f ere n t w i th its re al size (m axim um is 640 *4 80) . whe n t h e bu tto n set is chosen, a dial og con t ai ni ng t h e da ta s t ruct ure s will be p o p u p o u t, a ll the s u p port i n g p a ra m e ters an d c o lor ty pes are liste d in it (see fi g.3- 5). t h e ? snapshot image resolution ? in th is di al og is th e resol u t i o n of im ages got by ? snap ? (button s1 1 on evaluation or dem o board). shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 9 free datasheet http://www.datasheetlist.com/
OV528 user manual the st o p button is to be used to stop the display i ng operation im m e diately . the last o n e, nam e ly the d ecode b u tt on corresp on ds t o t h e fun c ti on of dec o m p ressing som e jpeg im age into the bitm ap files through hardw a re. as for the decode function, m o re words are needed. at first, user s h o u ld se lec t a jpeg file fro m the hard dis c as t h e so urc e im age (fig.3-6). then t h e software will check several dom ains of the file header to m a ke sure that file is a ? va l i d ? one. no te : word ?v alid? m e ntioned above refers to the follow i ng situations: 1. source file? s size m u st be one of the follow i ng 4 kinds: 320*240, 640*480, 176*144, 35*288. 2. jpeg files m u st be those being created from o v 528 sy stem especially those generated by jpeg image parameters light fr equency select bmp image parameters snapshot image r e solution b. for 6630 or 6640 a. for 7620 or 7635 fig 3-5. sensor param e ters? setting d i alog fi g .3-7 invalid file size messa g e fig.3-6 select a jpeg file ?snapsho t?. t h at m eans so m e oth e r ty pe s ev en t h e st a ndar d jpeg fi les ca n? t m eet o u r dem a nds at the m o m e nt. otherwise, a n error m e ssage will be p o s t ed a n d th e func ti on wil l r e turn f a lse (fig.3-7 and fig.3-8). if the fil e m e e t s the sta n dard, a dial og bo x (fig.3-9) w i l l be cre a te d t o i n form the use r to sel ect th e desti n a t i on b m p file? s prop erties. a n d , of co urse, th e de coded file? s si ze m u st be no lar g er than the source file? s . 3.5 snap shot gr oup this group contains one button and several radios. button go! is the entry of functions to get shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 10 free datasheet http://www.datasheetlist.com/
OV528 user manual sour ce file? s type and siz e destination file? s pr operty fig.3-8 invalid file t y pe m e ssage fig.3-9 set the destination file properties a com p ressed picture from the hardware and 1. display the decom p ressed still bm p im age on the snap shot picture view window; 2. save th e dec o m p ressed im age dat a int o fi le ? snapshot.jpg ?. the siz e of th e fi le is d e term ined before han d by cho o si ng one of the f our r a di os (v g a m ode) or one of the thre e radi os (cif m ode). a l so don? t for g et to specify a size from the snapshot group before ?g o!?. 3.6 dsc gr oup when dsc b u tt on is pressed dow n, flas h mem o ry d i alo g w i l l a p p e ar (see fig. 3- 10). from the dia l og, you c a n vi ew a tabl e tha t cont ai ns all t h e flas h m e m o ry i m a g es? inform ation, or you ca n del e te al l of t h em by pressing fo r m a t all bu tt on o r t h e l a st on e by delete la st (of co urse, y ou m u st think tw ice befor3e doing so, though it? s just a sm all deal). it provides two ways to load an im age from the flash m e m o ry . double-click any list of the table to load up the file delete all pictur es delete last pictur e id edit box pictur e list ta b l e v i ew ar ea (only jpeg image) fi g .3-10 flash mem o r y picture v i ew dialo g 1 . when yo u double click an item listed in the t a bl e, th e id of t h is it e m will ap pear in the id edi t box, at the sa m e ti m e , the r eal im age (jpeg type) will show i n t h e v i ew ar ea . so far , the im age shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 11 free datasheet http://www.datasheetlist.com/
OV528 user manual has been loaded out even you exit the dialog now . 2. y ou can also put the id num ber into the id edit box then by pressing the load this button to load the im age with the given id num ber . the foregoing two ways can produce the sam e ef fect. the total m e m o ry of the flash is 8 mega by tes and has been divided into 1000 blocks. so each lock? s size is 8 k by tes. save image button of d s c group corresponds to the function of saving the current live im age into the flash m e m o ry . a m e ssage box will appear after this operation to inform whether it has been successfully finished or not. unlike save image , save d i sc file will save a disc file rather than a current display e d im age into the flash m e m o ry . thus, an object file m u st be specified by the user at first (see fig.3-1 1 ). fig.3-1 1 select a file to down load into flash mem o r y 3.7 cursor & mouse messages a s w e know , w h en y o u c lic k or do ubl e-cl ick w i th y o u r m ouse on s o m e gi ve n reg i o n , m e ssages are create d . w i n d o ws will ca ptu r e th e m e ssages an d se nd t h e m to t h e prog ra m or to b e m o re precise l y , to the w i ndow s procedure. such reg i o n s tha t defi ne d i n our pro g ra m and respo n s e t o th e m e ssages to ge th e r com pose t h e ? flash memory pictur e v i ew w i ndow ? a n d ? thumbnail w i ndow ?. t o t a lly , t h e r e are 12 suc h sm all regions w h ich w e call ?thum bnail?. if there is im a g e with in a n y of t h ese 12 t h u m bnails y o u can c lic k or d o u b le-c lic k wi th y our m ouse on it. in t h e f o rm er case, t h e im age will be shown i n th e snapshot pictur e v i ew w i ndow and in the l a t t er case , the i m age d a te wil l be s a ved int o a jp eg file with the nam e ?thum bnail* .j pg ? (th u m b n a il w i n d o w ) o r ?ovdsc.jp g ?(flash mem o ry picture v i ew w i n dow ) u nder c u rrent directory . no te : in thum bnail*.jpg , * is replaced by num ber from 0 to 10. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 12 free datasheet http://www.datasheetlist.com/
OV528 user manual 4. softwar e develop guide in th is par t , we will g i v e a de tai l e d d e scrip tio n of OV528 sof t ware? s devel o p g u i d e. da t a struct ures, dri v er ex porte d func ti ons, p a ra m e ters , com m ands a n d pr ot oco l s (o nly in o v 528d rv . d ll ) are ex pla i n e d. base o n t h e g u id e, us ers ca n de ep ly un de rstand o v 5 28 softw a re an d easily d e ve lo p their own software. 4.1 data s t ructur e 4.1.1 sensor t y pe t a b l e 4 - 1 s e n s o r t y p e sensor t y pe definition o v 7 6 2 0 0 x 0 0 o v 7 6 3 5 0 x 0 1 o v 6 6 3 0 0 x 0 2 o v 6 6 4 0 0 x 0 3 4.1.2 c o lor t y pe t a ble 4-2 color t y pe co lo r t y pe definitio n bitm ap 2 bit gray 0x01 bitm ap 4 bit gray 0x02 bitm ap 8 bit gray 0x03 bitm ap 8 bit color 0x04 bitm ap 12 bit color 0x05 bitm ap 16 bit color 0x06 jpeg 0 x 0 7 4.1.3 jpeg image siz e t a ble 4-3 jpeg im age size jpeg image siz e d e finition r e marks 80x64 (vga) 0x01 1 6 0 x 1 2 8 0 x 0 3 3 2 0 x 2 4 0 0 x 0 5 6 4 0 x 4 8 0 0 x 0 7 for ov7620 and ov7635 (vga/qvga) the hei g ht of the jpeg im age m u st be t h e m u ltipl e s of 1 6 . th at is wh y there are 12 8 and 64 instead of 120 and 60. 80x64 (cif) 0x02 1 7 6 x 1 4 4 0 x 0 4 3 5 2 x 2 8 8 0 x 0 6 for o v 6630 and o v 6640 (cif/q cif) because of the sam e reason as in ov76##, there is 80x64 instead of 88x72. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 13 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.1.4 bitmap image siz e (pr e view siz e ) t a ble 4-4 bitm ap im age size bitmap image siz e d e finition r e marks 8 0 x 6 0 0 x 0 1 1 6 0 x 1 2 0 0 x 0 3 3 2 0 x 2 4 0 0 x 0 5 6 4 0 x 4 8 0 0 x 0 7 for ov7620 and ov7635 (vga/qvga) 8 8 x 7 2 0 x 0 2 1 7 6 x 1 4 4 0 x 0 4 3 5 2 x 2 8 8 0 x 0 6 for o v 6630 and o v 6640 (cif/q cif) 4.1.5 pr eview or snapshot im age information (select_p aram) t a ble 4-5 preview or snapshot im age inform ation p a r a m e t e r s t y p e s r e m a r k s color t y pe o n e of the ty pes in t a ble 4-2 bitm ap im age size one of the types in t a ble 4-4 jpeg im age size uint o n e of the ty pes in t a ble 4-3 4.1.6 flash memory file information (pflash_filet a bleitem) t a ble 4-6 flash mem o ry file inform ation p a r a m e t e r s t y p e s r e m a r k s file id word s t art from 1 to 51 1 file nam e char[2] reserv ed 1 dword reserved 2 word reserved property file ty pes (jpeg , bitm ap or o t hers) low - by te of s t art block h i gh-by te of s t art block 8k by tes per block (sam sung and t o shiba) low-by te of file size middle-by te of file size h i gh-by te of file size byte supp ort flash m e m o ry size: 2m x 8bi t ~ 32m x 8b it, sin g l e file? s m a x. size is 1 6 m. (for sam s un g a n d t o shiba , t h e flash m e m o ry size is 8m) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 14 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.1.7 d i splay image information (only in ov 528a p.exe ) t a ble 4-7 d i splay im age inform ation p a r a m e t e r s t y p e s r e m a r k s bitm ap im age data buf f er byte jpeg im age data buf f er byte bitm ap im age data w i dth uint bitm ap im ag e data heig h t uint jpeg im ag e data size dword t o dis p lay im age o n ?flas h mem o ry picture v i ew w i ndow? or ?thum bnail w i ndow ? 4.2 function modules just l i ke user gu ide , w e d i vi de the fun c ti ons prov id ed by the dr iver i n t o se v e ral m odules. generally speaking, they are: 1. d o w n load or update firm w a re 2. sy stem ? s initialization, start, reset and stop 3. preview of live v i deo 4. snapshot of s till jpeg im age 5. d s c or flash m e m o ry 6. jpeg im age? s decoding 7. o t hers 4.2.1 commands there are totally15 ow n-de fined comm ands in ov 528 system . OV528drv .dll talk s with firm wa re (default nam e is rsr unner .bin) by m eans of these comm ands. w ith them , software and firmware have their own ?language?. only after driver got in touch with firm wa re through comm ands, c a n the whole system run up. w h at is m o re, only after driv er got the af firm ative answer (aga in, it is comm and) from fir m ware, can any operation be successful. any com m a nd is com posed with eight bytes. s t arting with three bytes of 0xff , the fourth by te is th e id num b er of the comm and, following them are four param e ters. comm a nd? s id num b er ranges from 1 (0x01) to 15 (0x0f). it is used by fir m ware to identify which is which. the last four bytes, or nam e ly param e ters, are the content of th e comm and. ther efore, any comm and wi ll look like this: 0xffffff0? p 1p2p3 (? is from 1 to f). t a ble 4-8 lists all the com m a nds? nam e , id and param e ters. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 15 free datasheet http://www.datasheetlist.com/
OV528 user manual t a ble 4-8 com m a nd list c o m m a n d i d parameter1 paramet e r 2 p a r a m e t e r 3 p a r a m e t e r 4 initial 0 x 0 1 0 x 0 0 c o l o r t y p e preview resolution jpeg resolution dump 0 x 0 2 0 x 0 0 0 x 0 0 0 x 0 0 0 x 0 0 set register 0 x 0 3 a d d r e s s o f register register t y pe d a ta 0x00 get picture 0x04 picture t y pe file id low by te / color t y pe/0x00 file id high by te / preview reso l u t i o n/0x00 0x00 / jpeg resolution snap shot 0 x 0 5 s n a p s h o t ty p e skip fram e low byte skip fram e h i gh by te 0x00 sa ve da t a 0x06 d e s t i n a t i o n leng th by te 0 / jpeg re- solution/0x00 length by te 1 / 0x00 file property / length by te 2 / 0x00 set baudra te 0 x 0 7 f i s t d i vider s e c o n d d i vider 0 x 0 0 0 x 0 0 reset 0 x 0 8 r e s e t t y p e 0 x 0 0 0 x 0 0 0xx x * power off 0 x 0 9 0 x 0 0 0 x 0 0 0 x 0 0 0 x 0 0 da t a 0x0a d a ta t y pe length by te 0 l ength by te 1 package st a t u s / length by te 2 get register 0 x 0 b a d d r e s s o f register register t y pe 0x00 0x00 download program 0x0c d e stination length by te 0 l ength by te 1 length by te 2 sync 0x0d 0 x 0 0 0 x 0 0 0 x 0 0 0 x 0 0 ack 0x0e com m a nd id a c k counter 0x00 0x00 nak 0x0f 0x00 nak counter error code 0x00 no te : * if the param e ter is 0xff , the c o m m and is a speci al r e set com m a nd a n d t h e firm ware responds to it im m e diately . t a ble 4-9 gives out the explanations of these com m a nds. t a ble 4-9 com m a nd explanation c o m m a n d e x p l a n a t i o n initial host sen d s t h is c o m m a nd to co nfig ure th e c a m e ra. after rece iv ing t h is com m a nd, cam era program s its internal settings based on its ow n uc program . co lo r t y pe : t a ble 4-2 pr ev iew reso lutio n : t a ble 4-4 jpeg r e solution : t a ble 4-3 dump cam e ra will set its registers with default values when receives this com m a nd. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 16 free datasheet http://www.datasheetlist.com/
OV528 user manual shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 17 set register host can control cam era? s internal register value by using this com m a nd. reg i ster t y pe : o v 528 register: 0x00 sensor register: 0x01 get picture h o st can get picture from o v 528 by using this com m a nd. pictur e t y pe : snap shot picture: 0x01 preview picture: 0x02 flash mem o ry file: 0x04 jpeg preview picture: 0x05 decode picture: 0x06 flash mem o ry free space: 0x08 file id low byte and file id high byte : if it is ge tt i ng pi ctur es fro m flash m e m o ry , these tw o param e ters det e rm ine w h i c h o n e is th e o b je ct. t h e id num ber starts fro m 0x01. if the id num ber is 0x00, firm ware will send flash file t a ble data back. snap shot host sen d s th is com m a nd t o inf o rm ov52 8 to kee p a jpeg i m age in i t s me mo r y . snap shot t y pe : com p ressed picture: 0x00 u n com p ressed picture: 0x01 (unused) pictur e skip count : h o st can define how m a ny fram e pictures to skip before com p ression. ? 0 ? m eans keep current picture. ? 1 ? m eans com p ress next fram e . est. sa ve da t a by usi n g t h is c o m m and, h o st ca n s a v e dat a to o v 5 28 or flas h mem o ry , change snapshot resolution and delete flash mem o ry files. destination : serial bus to sra m (buf fer in o v 528): 0x01 serial bus to o v 528 fifo ra m: 0x02 (unused) serial bus to eepro m: 0x03 serial bus to flash mem o ry : 0x04 sra m to eepro m: 0x05 sra m to flash mem o ry : 0x06 change jpeg resolution for snapshot button: 0x07 delete flash mem o ry last file: 0xf0 form at flash mem o ry : 0xff length byte 0 / jpeg resolution : if d e stina t i o n is ?c ha nge j p eg resol u t i o n for sna p s hot b u tt on?, t h is by te is jpeg resol u t i o n . i f destina tio n is flash m e m o ry , th is by te is 0x 00. o t herw ise, it re prese n ts t h e low b y t e of d o w n l o ad in g pr ogra m ? s length. length byte 1 : if savin g file int o flas h me m o ry , it is 0x 00. ot herwise , it re presen ts the m i ddle by te of dow nloading program ? s length. free datasheet http://www.datasheetlist.com/
OV528 user manual shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 18 file pr operty / length byte 2 : if saving fi le int o flash mem o ry , it represe n ts t h e file propert y (see t a b l e 4-6). ot herwise, th is i s the hi gh est by te of dow nl oad i n g pr ogra m ? s length. set baudra te fist divider and second divider : baud rate = 14.7456mh z / 2 x (second d i vider + 1) / 2 x (first d i vider + 1) reset h o st can reset the sy stem by using this com m a nd. reset t y pe : ? 0x00 ? m eans reset the wh ole sy st e m . sy ste m will rebo ot a n d rese t al l regist ers and stat e m achine. ? 0 x01? m eans cam era only rese t stat e m achine. power off sy ste m will go i n t o sle e p-m ode whe n rec e iv es t h is c o m m a nd. t o wak e u p t h e sy ste m , host nee d to sen d sync co m m and se veral t i m es till rece i v es ack com m a nd from firm ware. da t a h o st dow n l oa ds or sy stem sends d a ta b a ck by usin g t h is com m a nd. th e uni t for the length is by te and it doesn? t include the length of com m a nd itself. da ta t y pe : register d a ta: 0x00 snapshot picture: 0x01 preview picture: 0x02 program : 0x03 flash mem o ry file: 0x04 jpeg preview picture: 0x05 d ecode picture: 0x06 check sum d a ta: 0x07 (unused) flash mem o ry free space data: 0x08 flash mem o ry file size: 0x09 length byte 1 and length byte 0 : if the da ta is about re gist e r , snaps h ot, p r eview pi ctur e, jpeg or fl ash, these tw o by t e s represen t t h e le ng th of t hose dat a . o t herw ise, t h ese tw o by tes are 0x0000. package s t atus / length byte 2 : if the da ta is f l ash file , t h is by te re presen t s th e p a c k ag e status (las t or not last). otherwise, this by te is the highest length by te. free datasheet http://www.datasheetlist.com/
OV528 user manual get register h o st ca n rea d sy stem ? s inte rnal re gist er v a lu e by us in g this com m a nd. sy stem will send back the register value by using da t a com m a nd. reg i ster t y pe: o v 528 register: 0x00 sensor register: 0x01 download program h o st ca n do w n loa d progr am to o v 5 2 8 by us in g t h i s com m a nd. a f ter host dow n l oa ds program into sy stem ? s progr am ra m, host ne eds to sen d sy n c com m a nd and w a it a c k com m a nd from firm w a re. destination : program ra m: 0x05 length : these t h ree bytes repres ent the last tw o b y t es of th e do w n loa d pro g ra m ? s length. sync eith er h o st or o v 528 ca n send t h is com m a nd. a c k co m m and is se nt ba ck after receiving this com m a nd. ack this c o m m an d is use d to ind i ca te t h e s u ccess of the last o p erat io n. after recei ving a n y val i d c o m m a n d , ack com m a nd is sent out exc e pt downloa d i n g program or getting preview data. command id : indicate the receiving com m a nd id. ack co unt : no u s e. nak this com m a nd is us ed t o i ndi cat e th e fa il of the l a st com m unicati o n or a ny unsupported feature. nak co unt : no u s e. e r ro r c o d e : error codes defined in firm ware. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 19 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.2 dow n load or update firmw a r e t a ble 4-10 d o w n load or u pdate functions and protocol bool downloadpr ogr a mt oOV528(hwnd hwnd, lpbyte lpbuffer , dword dwbuffersiz e, hwnd hpr o cessba r ) function description: if it? s th e first tim e for the sy stem to be use d a nd n o firm ware in it, t h is fu nct i o n will fulfi ll the order of d o wnlo ad in g file . this fu nct i o n is used to writ e firm ware fil e int o OV528 a nd c h ec k i t s v a li dity . if t h e file is val i d, t h e fu nct i o n will re turn tur e and pro g ram sho u l d i n v o k e fu nc ti on savet o eepr o m to re-write th e fi le i n to eeprom and store the file there. parameters: hwnd : handle of the m a in w i ndow lpbuffer : buf fer for firm w a re file (rsrunner . bin ) dwbuffersiz e : size of firm ware file hpr o gr essbar : hand l e o f th e progress i ng bar w h i c h ind i ca tes t h e progress of the dow nloading or updating operation functions bool savet o e e prom(hwnd hwnd, lpbyte lpb u ffer , dword dwbuffersiz e, hwnd hpr ogr essbar) function description: t h is fu nc tio n will up da te th e o l d firm ware with a n e w versio n. in fact, i t writes a n e w firm w a re in to eepr o m. w e re co mm end user t o us e t h is f u n c ti on ins t ea d of the first one as long as there is usable firm w a re in the sy stem . parameters: all the param e ters are the sam e with that in function ?d ow nloadprogram t o o v 528?. pr otocol h o s t o v 528 shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 20 check whether there exists firm ware already get com po rt han d l e & set baud rate do wnlo a d free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol sync ack program file update sync ack sa ve da t a ( d e stination:0x03 ack da t a ( t yp e:0x03 ) program file ack get com po rt han d l e & set baud rate download program check whether there exists firm ware already ack sync sync ack shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 21 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.3 system? s initializ ation, v i deo s t art, s t op and reset (exit) t a ble 4-1 1 sy stem ? s initialization function bool initco mport (hinst an ce hinsta nce, hwnd hw nd, dwor d * povtsensort y pe) function description : this f unc ti on will ge t th e han d l e of an ava ila ble co m p o rt an d s e t the c o rrect baud rate. parameters : hinstance : handle of the application program ? s instance hwnd : handle of m a in w i ndow povtsensort y pe : sensor ty pe, see t a ble 4-1 pr otocol h o s t o v 528 sync get com po rt han d l e & set baud rate ack g e t sensor t y pe initial ack set baudra te ack sync ack shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 22 free datasheet http://www.datasheetlist.com/
OV528 user manual function bool v i deos tart(select_p aram sel ect _param, hwnd getimagepr ocess, int nlightfr eq); function description: inv o k i n g th is fu nc ti on will inform the dri v er to a p ply a l o t of s o urce an d be gi n to get im age data from the sensor . parameters : select_param : preview im age inform ation, see t a ble 4-5. getimage pr o cess : h a nd le of t h e pr ocess b a r w h i c h i n dic a tes t h e o p e rati on of readi n g a fra m e of i m age. bec a use the rate of im age dat a ? s reading t h rough rs-232 por t is a l i t tle s l o w in a s e nse , the pro cessi ng bar w i l l i n form the custom er about the sy stem ? s current state. fr eqlight : it is the el ectr oni c frequenc y of the m a n-m a de lig ht s ource . th e v a l u e m u s t b e 5 0 o r 6 0 , o t h e r w i s e , i t w i l l r e t u r n f a l s e . i f t h e s y s t e m w o r k s un der t h e na t u ral li ght c o n d it io n, s u c h a s ou td oors, th i s param e ter is an in va li d one. it m u st be un i f orm with th e elec tron ic frequency to guar ant ee t h e e x posure tim e of any fra m e to be id ent i ca l. otherwise, m a ny bl ack an d white str i ps w ill a p p ear on the im age. t a ble 4-12 v i deo s t ar t shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 23 free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol h o s t o v 528 initial get picture (t y p e:0x02) nak da t a (t y p e: 0x02) preview im age data get picture (t y p e:0x02) ack ack da t a (t y p e: 0x02) preview im age data da t a (t y p e: 0x02) ack preview im age data ack a pply mem o ry w r ite light frequency v a lue into register check preview im age inform ation (select_param ) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 24 free datasheet http://www.datasheetlist.com/
OV528 user manual t a ble 4-13 s t op functions bool v i deos top(void) function description: when user ne eds t o cha nge t h e pre v i e w i ng im age form at or t a ke snaps hot st i l l im age, he sh o u ld st op t h e pr evi e w i n g vi de o. if the appl i cati o n e x i t s, user shoul d als o call this function before invoking function resetd evice(). pr otocol h o s t o v 528 release mem o ry ack reset (t y p e:0x01, param e ter4:0xff) t a ble 4-14 reset (exit) functions bool resetdevice(void) function description: once t h e appli cat ion progra m exit, i t s h oul d reset t h e device a n d se t t h e cam era to pow er of f sta t us t o sa ve en er gy . t h e dri v er sh ou ld als o free th e co m p o rt ha nd l e w h ich ha ve b een ap pl ied t o pro g ram . (before in vo ki ng th is fun c t i o n , user nee d s t o call v i deos top() at first in application program .) pr otocol h o s t o v 528 ack initial set baudra te ack power off release com port h a ndle ack shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 25 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.4 pr eview of live v i deo t a ble 4-15 preview of live v i deo functions bool v i ew live v i de o(b y te *pv i de obuffer , dw ord dwbuffersiz e, bool bpr o cessimagedata, dw ord *preti magesiz e , dword *pw i dth, dword *pheight) function description: after call i ng v i deos t a rt() funct i on, t h e applic at ion pr ogram can get the im age dat a fro m the driver one fra m e by one fra m e . if th e d r iv e r i s no t ready for one fra m e i m age da ta, i t will ret u rn f a lse, oth e rwise, it wi ll ret u r n true. and the i m age da ta will be stored in the buf fer that applied by the application program . if the driv er gets a wh ole fra m e of i m a g e da ta, driv e r will dec o d e the d a ta a n d convert t h em to rgb24 for m at accordi n g to the requir e m ent fro m t h e appl ica t i o n program , the n ret u rn th em to th e la tter t o s how on sc reen (preview w i n dow , s e e fig.3-3) parameters : p v i d e o b u f f e r : buf fer all o ca ted by app lic at io n pr ogram beforehan d for li ve video data. d w b u f f e r s i z e : size of the video buf fer . bpr o cessimagedata : if it i s ture, dri v er will co nver t t h e im age d a ta (wh i ch are go t i n fun c ti on v i de os t a rt).to rgb24 ; ot herwise, it will sen d o u t the dat a according to color type. pretimagesiz e : it is the size of the returned im age. pw idth and pheigh : w i dth and height of the fram e . pr otocol note: n o pro t oc ol (c omm a nd) i n t h is f unc ti on, all t h e t a sks are finish ed insi d e o v 528d rv .dll. h o s t o v 5 2 8 g e t v i deo d a ta (cooperate w ith function v i deos tart ) convert d a ta from jpeg or other com p ressed bm p form at to rgb24 (bprocessim a gedata is t u re) or d o n o thing ( bprocessim a g edata is f a lse ) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 26 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.5 snapshot of jpeg s t ill image t a ble 4-16 snapshot of jpeg s till im age bool snap shotjpegimage(byte *pv i deo b uffer , dword dwbuffersi z e , select_p a ram s t ill_select_p ar am, dword *pdatasiz e , dword *pw i dth, dword *pheight, int nlightfr eq) function description: this fu nct i on is t o g e t the jpeg im age dat a from the hardw a re an d save t o m e m o ry buf fer all o c a te d by ap pl ica t i o n p r ogram , then return t h e im age da ta to t h e latter to show on screen (snapshot picture v i ew w i ndow , see fig.3-3). parameters : pv ideobuffer : b u f f er all o ca ted by app lica t i on progr am beforehan d for stil l jpeg im age data. dwbuffersiz e : size of the video buf fer . select_param : snapshot im age inform ation, see t a ble 4-5. pd atasiz e : jpeg im age? s real size. pw idth and pheigh : w i dth and height of the fram e . nlightfr eq : light frequency . functions bool setsnapshotr esolution(se lect_p aram selectparam, int nlightfr eq, bool bcompr e ssed, byte bymediumt y pe) function description: this fu nc ti on is t o c h an g e the s i ze of t h e jpeg i m a g e (see t a bl e 4-3 for the siz e ty pe). here, the jpeg im age is g o t b y pressing b u tt on ? snap ? m ounted o n eva l ua ti on or dem o board a nd sa ve d d i re ctly i n to f l ash m e m o ry . it dif f ers fro m that g o t b y d r i v er an d send t o ap pl icati o n p r og ram t o di sp lay (j ust as fun c ti on snapshotjpegim age does). parameters : select_param , nlightfr eq : the sam e with that in function snapshotjpegim age. bcompr essed : is the s n a p shot pi ct ure in c o m p ressed form at or not . in fac t , uncom pressed im age? s snapshot isn? t supported by firm w a re now . bymediumt y pe : t h e ty p e of t h e stor ag e m e diu m , mt_pfla s h is th e on ly choice in current system . shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 27 free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol h o s t o v 5 2 8 check snapshot im age inform ation (select_param ) snapshotjpegimage initial ack snapshot ( t yp e: 0x00 ) ack get picture ( t yp e: 0x01 ) ack da t a (t y p e: 0x01) jpeg im age data ack chec k da ta problem (registe r 0x9c ) and convert to rg b24 setsnapshotresolution w r ite light frequency v a lue into register sa ve da t a (t y p e:0x07) check snapshot im age inform ation (select_param ) ack ack reset (t y p e:0x01, param e ter4:0xff ) w r ite light frequency v a lue into register shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 28 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.6 dsc or flash memory funtions t a ble 4-17 d s c or flash mem o ry functions bool d s c l oad(const pfl ash_fi let a bleitem *pfi let a bleitem, by te *pfile buffer , dword dwfilebuffers iz e, dword *pnumberofbytesw r itte n, byte bymediumt y pe) function description: this functions will load either the file ta ble or the specified file from the flash m e m o ry then save into a disc file on the hard disc. the file? s extension nam e can be one of the tw o ty pes : jpg and bm p or no extens ion nam e exists if the file is neither a jpeg nor a bitm ap file. parameters : pflash_filet a bleitem : flash m e m o r y file inform ation (see t a ble 4- 6). if this param e ter is null, driver will thi n k t h a t ap pl ica t i on p r ogram want t o l o ad th e file ta bl e fro m the flash m e m o ry . otherwise, dri v er cons ider i t to b e th e inform ation of the specified file in flash m e m o ry . pfilebuffer : buf fer contain the file content. dwfilebuffersiz e : size of the file buf fer . pnumberof b ytesw r itten : t o ta l num ber of t h e by te s tha t re ad in to the fil e buf fer . bymediumt y pe : the ty pe of the st orag e m e diu m , mt_pflash i s the o n ly choice in current system functions bool dscsave(selec t_p aram select param, int nlight fr eq, wor d wskipframe, bool bcompr e ssed, byte bymediumt y pe) function description: it will save the current im age in the ram into the flash m e m o ry . the total num ber of the im age is from 1 to 51 1. single file? s m a xim u m size is less than 16 m by tes (lim ited by flash m e m o ry ? s size, such as sam s ung and t o shiba, this num ber is only 8 m by tes in our current sy stem ). parameters : select_param : snapshot im age inform ation, see t a ble 4-5. nlightfr eq : light frequency , 50h z or 60h z. wskipframe : sav e wh ich i m age, c u rrent or n o t. if i t is 0, curren t im a g e wi ll be save d. ot herwise, firm ware will s k i p wski pfra m e fra m e s of im age a n d sa ve th e next one. bcompr essed : is the im age sa ve d i n com p ressed form at or not. in fac t , uncom pressed im age? s saving isn? t supported by firm w a re now . bymediumt y pe : th e ty p e of th e stor age m e dium , m t _pflash is the on ly choice in current system . shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 29 free datasheet http://www.datasheetlist.com/
OV528 user manual shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 30 bool dscformat(byte bymediumt y pe) function description: if th is fu n c ti on is c a l l ed , al l the im ages i n flas h m e m o ry will be del e te d wi th o u t recov e rab ili ty . thus, ap pli c a tio n pro g ram shou ld rem i nd user of t h e af term ath bef o re invoking this function. parameters : bymediu m t y pe : t h e t y pe of t h e st orage m e diu m , mt_pfla s h is th e o n ly choice in current system bool dscdeletelastfile(byte bymedeiumt ype) function description: this f unc t i on wi ll i n for m the firm ware to d e le te t h e las t fil e fro m the flash me mo r y . parameters : bymediu m t y pe : t h e t y pe of t h e st orage m e diu m , mt_pfla s h is th e o n ly choice in current system bool dsct ransmitfile(const byte *p buffer , dword dwbuffersiz e, byte bysavedatat y pe, byte bymediumt y pe) function description: unlike dscsave, this function will save a disc im age file rather than a currently display e d one into the flash m e m o ry . thus, an object im age file m u st be specified by the user at first. file of any ty pe can be saved as long as the file? s size is w ithin the bound of lim itation. parameters : pbuffer : buf fer that contains the file to be saved into flash m e m o ry . dwbuffersiz e : size of the file buf fer . bysavedat a t y pe : this p a ra m e ter is us ed by a p p lic a tio n progr a m to class i fy th e files. n o w , w e rou ghly di vi d e d the fil e s i n flash m e m o ry int o 3 ty p e s, j p eg , bmp and oth e rs. accord in g t o th is par a m e ter , app lic at io n pr ogram will ap ply d i f f erent operation m e thods on them and save into dif f erent files. bymediumt y pe : t h e ty p e of t h e stor ag e m e diu m , mt_pfla s h is th e on ly choice in current system functions bool dscgetfr eespa ce(dword * p fr eespacesiz e, byte bymediumt y pe) function description: t o get the rem a ined space in flash m e m o ry . parameters : pfr eespacesiz e : quantity (in bytes) of the free space. free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol h o s t o v 5 2 8 dsclo a d load file t a ble fr om flash memory get picture (t yp e: 0x 04 id : 0x 00 ) ack o r nak end file t a ble data ack da t a load file fr om flash memory get picture (t y p e:0x04 id:1-511) ack file data ack da t a (not the last package) file data ack da t a (the last package) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 31 free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol h o s t o v 5 2 8 dscsa v e check im age inform ation (select_param ) reset (t y p e:0x01, param e ter4:0xff) ack snap shot ack sa ve da t a (d estination: 0x06) ack dscfo r ma t sa ve da t a (destination: 0xff) ack reset (t y p e:0x01, param e ter4:0xff) ack dscdeletela stfile sa ve da t a (d estination: 0xf0) ack ack initial w r ite light frequency v a lue into register shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 32 free datasheet http://www.datasheetlist.com/
OV528 user manual shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 33 pr otocol h o s t o v 5 2 8 ack da t a (ty p e: 0x08) ack get picture (t y p e:0x08) dscgetfr eespace ack ack da t a (t y p e: 0x09) sa ve da t a (d estination: 0x04) da t a (t y p e: 0x04, not the last package) disc file data da t a (t y p e: 0x04, the last package) ack disc file data ack check file size (<16m by tes) dsct ra nsmitfile free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.7 jpeg image d ecoding t a ble 4-18 jpeg im age d ecoding bool jp gdecoder(unsigned char *ucs our c ebuffer , un signed char *ucdestbuffer) function description: this function will decode a jpeg im age file into a 24-bit bitm ap file. jpeg file? s size, width and height will be read out inside this function. parameters : ucsour cebuffer : source buf fer for jpeg im age data. ucdestbuffer : destination buf fer for bitm ap im age data. functions bool decodepictur e(select_p a ram dec o depar a m, const byte * p pictur ebuffer , dword dwbu ffersiz e, byte *pbmpbuffer); function description: this function can also decode a jpeg file into a bitm ap one. unlike function jpg d ecoder , this one decodes the jpeg file by m eans of hardw a re (o v 528) but not by softw a re. a nd, there are som e lim itations on this function? s usage. the lim itations are: 1. so urce f ile ? s size m u st be one of th e fol l ow i ng 4 ki nds: 3 2 0 * 2 4 0 , 64 0* 48 0 , 176*144, 352*288. 2. jpeg files m u st be th o s e be in g cre a t ed fro m o v 52 8 sy stem especi al ly th os e generated by operation ?snapshot?. parameters : select_param : source im age file? s inform ation, see t a ble 4-5. ppictur e buffer : source im age file? s buf fer . dwbuffersiz e : size of source im age file? s buf fer pbmpbuffer : object im age file? s buf fer shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 34 free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol this is defined and im plem ented in jpeg d ecoder . dll , no com m a nd has been com e dow n to. h o s t o v 5 2 8 jpgdecoder decodepictur e sa ve da t a (d estination: 0x01) ack data da t a (t y p e:0x06) ack get picture (t y p e:0x06) ack da t a (t y p e: 0x06) ack d ecoded d a ta shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 35 free datasheet http://www.datasheetlist.com/
OV528 user manual 4.2.8 other functions t a ble 4-19 o t her functions bool readregister(int nregis teradd, int *pregisterv alue) function description: this function is designed to read the value of o v 528 registers. parameters : nregisteradd : address of the object register pregisterv alue : address where the value read out from register is saved. bool w r iteregister(int nregis teradd, int nregisterv alue) function description: this function is designed to w r ite a num ber into o v 528 registers. parameters : nregisteradd : address of the object register pregisterv alue : value that will be written into the object register . bool rea d i2 creg i ster(int nreg is teradd, int *pregisterv alue) function description: this function is designed to read the value of sensor registers. parameters : nregisteradd : address of the object register pregisterv alue : address where the value read out from register is saved. bool w r itei2cregister(int nreg isteradd, int nregisterv alue) function description: this function is designed to w r ite a num ber into sensor registers. parameters : nregisteradd : address of the object register pregisterv alue : value that will be written into the object register . functions bool getfirmwar ev ersion(byte *pma jorv ersion, byte *pminorv ersion) function description: this function will read the firm ware version from a given register . parameters : pmajorv ersion and pminorv ersion : version value. shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 36 free datasheet http://www.datasheetlist.com/
OV528 user manual d w or d ov getlasterr or(void) function description: this f u n c ti on wi ll re turn the error c o d e s defi ne d i n firm ware to t h e a p p lic at io n program or the driver . bool poweroff(void); function description: set the sy stem into sleep m ode in order to save ener gy . functions bool w a keup(void); function description: w a ke up the sy stem w ho is sleeping to w o rk. pr otocol h o s t o v 5 2 8 shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 37 ovgetlasterr or a s for functions ovgetlasterr or , no com m a nds are used in them . ack set register (t y p e:0x00) w r iteregister get register (t y p e:0x00) ack da t a (t y p e: 0x00) ack register v a lue rea d reg i ster free datasheet http://www.datasheetlist.com/
OV528 user manual pr otocol h o s t o v 5 2 8 get register ack (t y p e:0x00 p1: 0xf0 ) da t a (t y p e: 0x00) register v a lue ack getfirmwar ev ersion ack power off set register (t y p e:0x01) ack poweroff ack reset (t y p e:0x01, param e ter4:0xff) w r itei2cregister get register (t y p e:0x01) ack da t a (t y p e: 0x00) ack register v a lue rea d i2 creg i ster shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 38 free datasheet http://www.datasheetlist.com/
OV528 user manual h o s t o v 5 2 8 wa k e u p sync ack ack sync 4.2.9 thr e ad and synchr oniz ation in func ti on v i de os tart , a t h read is crea t e d t o rea d i n im age da ta f r o m hardw a re. bec a use th i s t h read has b e en regard ed as a g l ob al v a ri abl e , we gi ve n a m e ? g_hr e adimagethr eadhandle? to the ha nd le of this thre ad. once th e t h rea d is e x ec ut ed, i m age da ta wi l l be c ont in ua ll y read i n unt il an error engenders or the operation is stopped by user . in w i nd ow s, several sy n c h r oniz a t i o n ob j ects are pr ovi ded t o p e rm it the t h rea d s t o sy nchro n iz e the i r ac tio ns. therefore , d e pen d i ng on th e m , we can in form the thre a d t o st op re ad ing th e im age dat a . h e re, w e use ?e ve nt? w h ich is cre a t e d i n fu nc tio n v i deos t a rt t o tak e o n t h e w o rk, a nd it i s initialized to be ?m anual-reset? and ?unsignaled?. in func ti on v i deos to p, t h e even t o b j ect (the n a m e of its ha ndl e is ? g_hs topreadevent ?) will be m a nually rese t t o be ?si g n a l e d?. so, t h e th read fun c ti on ( r e adimage thr e ad ) n e e d s t o ch ec k th e state of g _hs t opr ead eve n t at pr oper pos i tio ns t o m a ke sure w h et her t h e rea d i ng op erati on s h o u l d be co nt in ued or no t. t o be s p e c ific , i f th e e v e n t o b jec t is ?si g nal e d?, fun c ti on sh oul d sto p im m e diately . o t herw ise, continue. beyo nd read in g i m ag e d a ta fro m h a rd ware, ov5 28 drv . dl l st il l nee d s t o sen d th e d a t a t o the app lic at io n program . for th e sa ke of no t i n terru pti n g b o t h of t h e o p era tio ns, we a llo c a te two im age dat a buf fers ( g_ img_ da ta_buf ) to rece i v e t h e im age dat a al terna t e l y . each buf fer has its owe fl ag w h ich has fo ur sta t es now an d c a n be u s ed t o in dic a t e t h e c u rren t state of the b u f f er . the fou r states are : 0 ? n o d a ta , n o op erat io n; 1 ? writin g d a t a in to; 2 ? re a d in g d a ta ou t; 3 ? h a s da ta, no o p era t i on. however , only state 0 and state 3 have been utilized now . a not her sy nc hron iza t i o n o b je ct co nc erni ng w i t h g_im g_d at a_b u f i s sem a phore , it in dic a t e s t h e status of the source (im a ge buf fers). ?signaled sem a phore o b ject? m eans there is available source. w ith sem a phore object, the im age buf fers are guaranteed not to be ?illegally occupied?. (in fact, t h e f u nct i o n s of se m a phore o b j e ct a nd im age buf fer ? s flag a r e over l ap pe d to som e exte n d , user can develop their ow n sy nchronization m echanism . ) shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 39 free datasheet http://www.datasheetlist.com/
OV528 user manual shanghai omniv i sion ic design, inc. v e rsion 1.1, july 18, 2002 t e l: (021)50803390 fax: (021)50803389 e_mail: support@ovt.com.cn w e bsite: http://www .ovt.com .cn 40 index of functions t o t a lly , there are 24 e x p o rted fu nct i o n s fro m o v 528d rv .dl l , al l of them are describe d in thi s m a nual. for convenience, we give out the index of each function. t a ble function index function n a me page t a ble d o w n loadprogram t o o v 5 2 8 2 0 - 2 1 4 - 1 0 savet o eepro m 2 0 - 2 1 4 - 1 0 initcom p o r t 2 1 - 2 2 4-1 1 v i deos t a r t 2 3 - 2 4 4-1 1 v i deos t o p 2 5 4 - 1 3 resetd e v i c e 2 5 4 - 1 4 v i ew livev i d e o 2 6 4 - 1 5 snapshotjpeg im a g e 2 7 4 - 1 6 d s c l o a d 2 9 3 2 4 - 1 7 d s c s a v e 2 9 3 3 4 - 1 7 d s cform a t 3 0 3 2 4 - 1 7 d s c d e l e t e l a s t f i l e 3 0 3 2 4 - 1 7 dsct ransm i t f i l e 3 0 3 3 4 - 1 7 d s c g e t f r e e s p a c e 3 0 3 3 4 - 1 7 jpg d e c o d e r 3 4 - 3 5 4 - 1 8 d e c o d e p i c t u r e 3 4 - 3 5 4 - 1 8 r e a d r e g i s t e r 3 6 - 3 7 4 - 1 9 w r i t e r e g i s t e r 3 6 , 3 8 4 - 1 9 r e a d i 2 c r e g i s t e r 3 6 , 3 8 4 - 1 9 w r i t e i 2 c r e g i s t e r 3 6 , 38 4-19 g e tfirm w arev e r s i o n 3 6 , 3 8 4 - 1 9 ovgetlasterro r 3 7 - 3 8 4 - 1 9 pow e ro f f 3 7 - 3 8 4 - 1 9 w a keu p 3 7 - 3 9 4 - 1 9 refer ences [1]. chip o v 528 d a tasheet [2]. o v 7620 product specifications ?rev .1.3 [3]. o v 7635 a dvanced inform ation prelim inary [4]. o v 6630 a dvanced inform ation prelim inary [5]. o v 6640 a dvanced inform ation prelim inary free datasheet http://www.datasheetlist.com/


▲Up To Search▲   

 
Price & Availability of OV528

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X